package com.ny.view;

import java.sql.SQLException;
import java.util.Scanner;

public class ManagerView {
    //六、管理员登录的界面
    //1.个人管理：个人信息的修改
    //2.用户管理：对其他用户进行操作（删除、修改、添加、查询）
    //3.商品管理：添加、删除、修改、查询商品
    //4.订单管理：添加、删除、修改、查询订单
    public void showManagerView() throws SQLException, ClassNotFoundException {
        boolean f = true;
         while (f) {
             System.out.println("请选择你的操作");
             System.out.println("1.用户管理");
             System.out.println("2.商品管理");
             System.out.println("3.订单管理");
             System.out.println("0.退出系统");
             Scanner sc = new Scanner( System.in);
             int choice = sc.nextInt();
             switch (choice){
                 case 1:
                     System.out.println("用户管理界面");
                     System.out.println("1.添加用户");
                     System.out.println("2.删除用户");
                     System.out.println("3.修改用户");
                     System.out.println("4.查询用户");
                     int choice1 = sc.nextInt();
                     switch (choice1){
                         case  1:
                             System.out.println("1.添加用户");
                             ReguserView  reguserView = new ReguserView();
                             reguserView.showRegisterForm();
                             break;
                         case 2:
                             System.out.println("2.删除用户");
                             DeleteView deleteView = new DeleteView();
                             deleteView.showDeleteForm();
                             break;
                         case 3:
                             System.out.println("3.修改用户");
                             break;
                         case 4:
                             System.out.println("4.查询用户");

                             break;
                         default:
                             System.out.println("输入错误");
                             break;
                     }

                     case 2:
                       System.out.println("商品管理");
                       System.out.println("1.添加商品");
                       System.out.println("2.删除商品");
                       System.out.println("3.修改商品");
                       System.out.println("4.查询商品");
                       int choice2 = sc.nextInt();
                       switch (choice2){
                           case 1:
                           System.out.println("1.添加商品");
                           break;
                         case 2:
                           System.out.println("2.删除商品");
                           DeleteProductForm deleteProductForm = new DeleteProductForm();
                           deleteProductForm.showDeleteProForm();
                           break;
                         case 3:
                           System.out.println("3.修改商品");
                           break;
                         case 4:
                           System.out.println("4.查询商品");
                           break;
                         default:
                           System.out.println("输入错误");
                       }
                         break;
                     case 3:
                       System.out.println("3.订单管理");
                         break;
                     case 0:
                       System.out.println("0.退出系统");
                       return;



             }

        }
    }


};


